<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>browser</title>
</head>
<body>
<div id="root"></div>

<script>
  console.log(History); // ƒ History() { [native code] }
  console.log(history);
  /*
  History
  length: 1
  scrollRestoration: "auto"
  state: null
  __proto__: History
    back: ƒ back()
    forward: ƒ forward()
    go: ƒ go()
    length: (...)
    pushState: ƒ pushState()
    replaceState: ƒ replaceState()
    scrollRestoration: (...)
    state: (...)
    constructor: ƒ History()
    Symbol(Symbol.toStringTag): "History"
    get length: ƒ length()
    get scrollRestoration: ƒ scrollRestoration()
    set scrollRestoration: ƒ scrollRestoration()
    get state: ƒ state()
    __proto__: Object
  */
  /** 3个属性*/
  // + length(Read only): 表示会话历史记录中的历史数量 包括当前加载的页面 例如 对于新打开的选项卡 值就为1

  // + scrollRestoration:
  //    + auto/*←默认值*/: The location on the page to which the user has scrolled will be restored.
  //    + manual: The location on the page is not restored. The user will have to scroll to the location manually.
  console.log(history.scrollRestoration)
</script>
</body>
</html>
